﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CustomerGroups.aspx.cs" Inherits="famails.BackEnd.Customer.CustomerGroups" MasterPageFile="~/Master.Master" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div style="width: 100%; padding: 10px;">
        <!--start content 01-->
        <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="border: 1px solid #333; margin-bottom: 10px; padding: 0px;">
            <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="padding: 10px 20px; background: #000; color: #fff; font-size: 18px; font-weight: bold; position: relative;">
                Thông tin nhóm khách hàng
            </div>
            <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="height: auto; padding: 10px;">
                <asp:Panel Visible="false" ID="pnError" runat="server">
                    <div class="error-box round">
                        <asp:Label ID="lblError" runat="server" Text=""></asp:Label>
                    </div>
                </asp:Panel>
                <asp:Panel Visible="false" ID="pnSuccess" runat="server">
                    <div class="confirmation-box round">
                        <asp:Label ID="lblSuccess" runat="server" Text=""></asp:Label>
                    </div>
                </asp:Panel>
            </div>
            <asp:HiddenField ID="hdfId" runat="server" />
            <div class="col-md-5 col-xs-12 col-sm-5 col-lg-5" style="height: auto; padding: 10px;">
                <fieldset>

                    <label for="simple-input" style="font-weight: bolder; text-transform: none">
                        Tên nhóm khách hàng</label>
                    <asp:TextBox ID="txtname" CssClass="form-control" Style="border: 1px solid #333; border-radius: 0px;"
                        runat="server"></asp:TextBox>

                </fieldset>
            </div>
            <div class="col-md-5 col-xs-12 col-sm-4 col-lg-5" style="height: auto; padding: 10px;">
                <fieldset>

                    <label for="simple-input" style="font-weight: bolder; text-transform: none">
                        Tài khoản quản lý</label>
                    <asp:DropDownList ID="ddlUser" CssClass="form-control" Style="border: 1px solid #333; border-radius: 0px;"
                        runat="server">
                    </asp:DropDownList>

                </fieldset>
            </div>
            <div class="col-md-2 col-xs-12 col-sm-3 col-lg-2" style="height: auto; padding: 10px;">
                <fieldset>
                    <button runat="server" class="btn" style="margin-top: 23px; float: left; background: #333; color: #fff; text-align: center; padding: 6px 15px; border-radius: 0px;"
                        onserverclick="btnSave_Click">
                        <i style="margin-right: 10px;" class="fa fa-save"></i>Lưu
                    </button>
                </fieldset>
            </div>
            <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="padding: 10px 20px; background: #000; color: #fff; font-size: 18px; font-weight: bold; position: relative;">
                Danh sách nhóm khách hàng
            </div>
            <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="padding:10px;">
                    <div class=" table-responsive">
                <table class="table table-striped table-bordered table-hover" id="dataTables">
                <thead>
                    <tr>
                        <th>Tên nhóm khách hàng</th>
                        <th>Tài khoản quản lý</th>
                        <th>Ngày tạo</th>
                        <th>Điều chỉnh</th>
                    </tr>
                </thead>
                <asp:Repeater ID="dlGroup" runat="server"> 
                    <ItemTemplate>
                        <tr>
                            <td style="text-align: left; padding: 7px 15px;">
                                <asp:Label ID="Label1" runat="server" Text='<%# Eval("GroupName") %>'></asp:Label>
                            </td>
                            <td style="text-align: left; padding: 7px 15px;">
                                <asp:Label ID="lblAttr" runat="server" Text='<%# Eval("UserName") %>'></asp:Label>
                            </td>
                            <td style="text-align: left; padding: 7px 15px;">
                                <asp:Label ID="lblGmail" runat="server" Text='<%# Eval("CreateDate") %>'></asp:Label>
                            </td>
                            <td style="text-align: center; padding: 7px 15px;">

                                <asp:ImageButton ID="btnEdit" runat="server" ImageUrl="../resource/images/edit-validated-icon.png"
                                    CommandArgument='<%# Eval("GroupID") %>' OnClick="btnEdit_Click" />
                                <asp:ImageButton ID="btnDelete" runat="server" ImageUrl="../resource/images/Delete-icon.png"
                                    CommandArgument='<%# Eval("GroupID") %>'
                                    OnClientClick="return confirmDelete('Bạn có chắc rằng sẽ xóa thuộc tính này không ?')"
                                    OnClick="btnDelete_Click" />

                            </td>
                        </tr>
                    </ItemTemplate>
                </asp:Repeater>
            </table>
            </div>
            </div>
        </div>
    </div>
    
<script>
    $(document).ready(function () {
        $('#dataTables').dataTable();
    });
</script>
</asp:Content>
